import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [{
        path: "/",
        name: "Home",
        component: Home
    },
    {
        path: "/picAcg",
        name: "PicAcg",
        component: () =>
            import ("@/views/demo/picAcg.vue")
    },
    {
        path: "/site-demo",
        name: "Site-demo",
        component: () =>
            import ("@/views/demo/site-demo.vue"),
        children: [{
                path: "/site-demo/site-a",
                name: "siteA",
                component: () =>
                    import ("@/views/demo/site-demo/site-a.vue")
            },
            {
                path: "/site-demo/site-b",
                name: "siteB",
                component: () =>
                    import ("@/views/demo/site-demo/site-b.vue")
            }
        ]
    }
];

const router = new VueRouter({
    mode: "hash",
    base: process.env.BASE_URL,
    routes
});

export default router;